package com.ckx.domain.dto;


import com.ckx.annotation.ContainNum;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "添加文章实体类", description = "用于封装添加文章时的数据")
public class ArticleAddDto {

    //标题
    @NotEmpty(message = "标题不能为空")
    private String title;
    //文章内容
    @NotEmpty(message = "内容不能为空")
    private String content;
    //文章摘要
    private String summary;
    //所属分类id
    @NotNull(message = "种类ID不能为空")
    private Long categoryId;
    //缩略图
    private String thumbnail;
    //是否置顶（0否，1是）
    @Pattern(regexp = "^[0|1]$")
    private String isTop;
    //状态（0已发布，1草稿）
    @Pattern(regexp = "^[0|1]$")
    private String status;
    //是否允许评论 1是，0否
    @Pattern(regexp = "^[0|1]$")
    private String isComment;
    //对应标签 id
    private List<Long> tags;

}
